<template>
	<view class="record">
		<view class="record-list" v-if="list.length > 0">
			<view class="record-list-view" v-for="(item,index) in list">
				<view class="record-list-view-date">日期：{{item.createtime_text}}</view>
				<view class="record-list-view-jifen">积分：<text>+{{item.integral}}</text></view>
				<view class="record-list-view-jifen">金额：<text>+{{item.money}}</text></view>
				<view class="record-list-view-type">类型：<text>会员消费</text></view>
			</view>
			
			
		</view>
		
		<view class="zan" v-if="list.length == 0">
			<image src="../../static/zan.png"></image>
			<view>暂无数据</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list : []
			}
		},
		onLoad() {
			this.getall();
		},
		methods: {
			getall(){
				let that = this;
				that.$api.recordgetall({}).then(res=>{
					if(res.code == 1){
						that.list = res.data.list;
						
					}
				})
				
			}
		}
	}
</script>

<style lang="less">
	.record {
		.record-list {
			width: 710rpx;
			margin: auto;
			margin-top: 40rpx;
			color: #333;
			.record-list-view {
				border: 2rpx solid #e8e8e8;
				padding: 10rpx;
				font-size: 36rpx;
				border-radius: 20rpx;
				margin-bottom: 30rpx;
				.record-list-view-date {
					border-bottom: 2rpx solid #e8e8e8;
					padding-bottom: 20rpx;
					padding-top: 20rpx;
					font-size: 38rpx;
				}
				.record-list-view-jifen {
					color: #777777;
					line-height: 80rpx;
					text {
						color: #ffcf41;
					}
					.jian {
						color: red;
					}
				}
				.record-list-view-type {
					color: #777777;
					line-height: 80rpx;
					text {
						color: #333;
					}
				}
			}
		}
	}
</style>